//
//  UIViewController.swift
//  Documentation
//
//  Created by Toj on 2/7/23.
//

import Foundation

public enum UIModalTransitionStyle : Int, @unchecked Sendable {
    case coverVertical = 0

    case flipHorizontal = 1

    case crossDissolve = 2

    @available(iOS 3.2, *)
    case partialCurl = 3
}

@MainActor public protocol UIContentContainer : NSObjectProtocol {

    
    @available(iOS 8.0, *)
    var preferredContentSize: CGSize { get }

    @available(iOS 8.0, *)
    func preferredContentSizeDidChange(forChildContentContainer container: UIContentContainer)

    @available(iOS 8.0, *)
    func systemLayoutFittingSizeDidChange(forChildContentContainer container: UIContentContainer)

    @available(iOS 8.0, *)
    func size(forChildContentContainer container: UIContentContainer, withParentContainerSize parentSize: CGSize) -> CGSize

    @available(iOS 8.0, *)
    func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator)

    @available(iOS 8.0, *)
    func willTransition(to newCollection: UITraitCollection, with coordinator: UIViewControllerTransitionCoordinator)
}
extension UIViewController {

    
    @available(iOS 8.0, *)
    public class let showDetailTargetDidChangeNotification: NSNotification.Name
    
    @available(iOS 5.0, *)
    public class let hierarchyInconsistencyException: NSExceptionName
}
@available(iOS 2.0, *)
@MainActor open class UIViewController : UIResponder, NSCoding, UIAppearanceContainer, UITraitEnvironment, UIContentContainer, UIFocusEnvironment {

    public init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?)

    public init?(coder: NSCoder)

    open var view: UIView!

    open func loadView()

    @available(iOS 9.0, *)
    open func loadViewIfNeeded()

    @available(iOS 9.0, *)
    open var viewIfLoaded: UIView? { get }

    open func viewDidLoad()

    @available(iOS 3.0, *)
    open var isViewLoaded: Bool { get }

    open var nibName: String? { get }

    open var nibBundle: Bundle? { get }

    @available(iOS 5.0, *)
    open var storyboard: UIStoryboard? { get }

    @available(iOS 5.0, *)
    open func performSegue(withIdentifier identifier: String, sender: Any?)

    @available(iOS 6.0, *)
    open func shouldPerformSegue(withIdentifier identifier: String, sender: Any?) -> Bool

    @available(iOS 5.0, *)
    open func prepare(for segue: UIStoryboardSegue, sender: Any?)

    @available(iOS 13.0, *)
    open func canPerformUnwindSegueAction(_ action: Selector, from fromViewController: UIViewController, sender: Any?) -> Bool

    @available(iOS, introduced: 6.0, deprecated: 13.0)
    open func canPerformUnwindSegueAction(_ action: Selector, from fromViewController: UIViewController, withSender sender: Any) -> Bool

    @available(iOS 9.0, *)
    open func allowedChildrenForUnwinding(from source: UIStoryboardUnwindSegueSource) -> [UIViewController]

    @available(iOS 9.0, *)
    open func childContaining(_ source: UIStoryboardUnwindSegueSource) -> UIViewController?

    @available(iOS, introduced: 6.0, deprecated: 9.0)
    open func forUnwindSegueAction(_ action: Selector, from fromViewController: UIViewController, withSender sender: Any?) -> UIViewController?

    @available(iOS 9.0, *)
    open func unwind(for unwindSegue: UIStoryboardSegue, towards subsequentVC: UIViewController)

    @available(iOS, introduced: 6.0, deprecated: 9.0)
    open func segueForUnwinding(to toViewController: UIViewController, from fromViewController: UIViewController, identifier: String?) -> UIStoryboardSegue?

    open func viewWillAppear(_ animated: Bool)

    open func viewDidAppear(_ animated: Bool)

    open func viewWillDisappear(_ animated: Bool)

    open func viewDidDisappear(_ animated: Bool)

    @available(iOS 5.0, *)
    open func viewWillLayoutSubviews()

    @available(iOS 5.0, *)
    open func viewDidLayoutSubviews()

    open var title: String?

    open func didReceiveMemoryWarning()

    weak open var parent: UIViewController? { get }

    /// 它是当前视图控制器所弹出的模态视图控制器.
    /// self.present(vc), presentedViewController = vc
    open var presentedViewController: UIViewController? { get }

    /// 它弹出了当前视图控制器作为模态视图控制器.
    /// self.present(vc), presentingViewController = self
    open var presentingViewController: UIViewController? { get }

    @available(iOS 5.0, *)
    open var definesPresentationContext: Bool

    @available(iOS 5.0, *)
    open var providesPresentationContextTransitionStyle: Bool

    @available(iOS 10.0, *)
    open var restoresFocusAfterTransition: Bool

    /// The identifier of the focus group that this view controller belongs to. If this is nil, the view controller inherits the focus group of its parent focus environment.
    @available(iOS 15.0, *)
    open var focusGroupIdentifier: String?

    /// The base name for tracking user interactions as activities hosted by this view controller.
    @available(iOS 16.0, *)
    open var interactionActivityTrackingBaseName: String?

    @available(iOS 5.0, *)
    open var isBeingPresented: Bool { get }

    @available(iOS 5.0, *)
    open var isBeingDismissed: Bool { get }

    @available(iOS 5.0, *)
    open var isMovingToParent: Bool { get }

    @available(iOS 5.0, *)
    open var isMovingFromParent: Bool { get }

    @available(iOS 5.0, *)
    open func present(_ viewControllerToPresent: UIViewController, animated flag: Bool, completion: (() -> Void)? = nil)

    @available(iOS 5.0, *)
    open func dismiss(animated flag: Bool, completion: (() -> Void)? = nil)

    @available(iOS 3.0, *)
    open var modalTransitionStyle: UIModalTransitionStyle

    open var modalPresentationStyle: UIModalPresentationStyle

    @available(iOS 7.0, *)
    open var modalPresentationCapturesStatusBarAppearance: Bool

    @available(iOS 4.3, *)
    open var disablesAutomaticKeyboardDismissal: Bool { get }

    // 一个布局属性, 它指示着controller view的[top, left, right, bottom]的四个方向边框的位置.
    // 不过这是要配合导航条, 底部tabbar这样的特殊组的页面才发挥出它的威力
    // 1. edgesForExtendedLayout
    // 2. UINavigationBar.isTranslucent: UINavigationBar半透明设置
    // 3. extendedLayoutIncludesOpaqueBars
    @available(iOS 7.0, *)
    open var edgesForExtendedLayout: UIRectEdge

    // 在不透明的情况下edgesForExtendedLayout是否还有效
    @available(iOS 7.0, *)
    open var extendedLayoutIncludesOpaqueBars: Bool
    /**
     * isTranslucent 与 extendedLayoutIncludesOpaqueBars 与 edgesForExtendedLayout 关系
     * 1. isTranslucent = true
     * * extendedLayoutIncludesOpaqueBars(可以忽略)
     * * - edgesForExtendedLayout: 有效
     *
     * 2. isTranslucent = false
     * * 1. extendedLayoutIncludesOpaqueBars = false
     * * - edgesForExtendedLayout: 无效
     * * 2. extendedLayoutIncludesOpaqueBars = true
     * * - edgesForExtendedLayout: 有效
     */

    @available(iOS, introduced: 7.0, deprecated: 11.0, message: "Use UIScrollView's contentInsetAdjustmentBehavior instead")
    open var automaticallyAdjustsScrollViewInsets: Bool

    /// Aggregate values (e.g., NSDirectionalRectEdgeAll) are accepted in the `edge` parameter; NSDirectionalRectEdgeLeading and Trailing are ignored on iOS 15.0
    @available(iOS 15.0, *)
    open func setContentScrollView(_ scrollView: UIScrollView?, for edge: NSDirectionalRectEdge)

    /// Pass only a single edge (e.g., NSDirectionalRectEdgeTop) in the `edge` parameter. Raises an exception when passed an aggregate edge (e.g., NSDirectionalRectEdgeAll)
    @available(iOS 15.0, *)
    open func contentScrollView(for edge: NSDirectionalRectEdge) -> UIScrollView?

    @available(iOS 7.0, *)
    open var preferredContentSize: CGSize

    @available(iOS 7.0, *)
    open var preferredStatusBarStyle: UIStatusBarStyle { get }
    
    /// 用于指示视图控制器是否应该隐藏状态栏.
    /// true: 状态栏将不可见; false: 状态栏将可见;
    open var prefersStatusBarHidden: Bool { get }

    @available(iOS 7.0, *)
    open var preferredStatusBarUpdateAnimation: UIStatusBarAnimation { get }
    /// 用于更新状态栏样式
    open func setNeedsStatusBarAppearanceUpdate()

    /// 返回当前故事板中连线所指向的视图控制器
    /// 如果连线没有指向任何视图控制器，则该属性的值将为 nil.
    /// 此外，如果您从代码中手动触发了 segue, 则该属性也可能为 nil
    open func targetViewController(forAction action: Selector, sender: Any?) -> UIViewController?

    /// 它用于在导航控制器中推出另一个视图控制器
    /// NOTE:
    /// 只有在当前视图控制器所属的导航控制器上调用 此方法才有效果.
    /// 如果当前视图控制器没有导航控制器, 则无法使用该方法来推出另一个视图控制器.
    open func show(_ vc: UIViewController, sender: Any?)

    /// 用于在分割视图控制器中展示详细信息视图控制器
    /// NOTE:
    /// 只有在当前视图控制器所属的分割视图控制器上调用 此方法才有效果.
    /// 如果当前视图控制器没有分割视图控制器, 则无法使用该方法来显示详细信息视图控制器.
    open func showDetailViewController(_ vc: UIViewController, sender: Any?)

    @available(iOS 13.0, *)
    open var overrideUserInterfaceStyle: UIUserInterfaceStyle
}

extension UIViewController {

    @available(swift 5.1)
    @available(iOS 16.4, tvOS 16.4, *)
    @propertyWrapper public struct ViewLoading<Value> {

        public init()

        public init(wrappedValue: Value)
    }
}

extension UIViewController {

    @available(iOS 15.0, tvOS 15.0, *)
    @MainActor public func setContentScrollView(_ scrollView: UIScrollView?)
}
extension UIViewController {

    @available(iOS, introduced: 5.0, deprecated: 16.0, message: "Please use instance method `setNeedsUpdateOfSupportedInterfaceOrientations`.")
    open class func attemptRotationToDeviceOrientation()

    @available(iOS, introduced: 6.0, deprecated: 16.0, message: "Update supported interface orientations and call setNeedsUpdateOfSupportedInterfaceOrientations to indicate a change.")
    open var shouldAutorotate: Bool { get }

    @available(iOS 6.0, *)
    open var supportedInterfaceOrientations: UIInterfaceOrientationMask { get }

    @available(iOS 6.0, *)
    open var preferredInterfaceOrientationForPresentation: UIInterfaceOrientation { get }

    /// Notifies the view controller that a change occurred that affects supported interface orientations or the preferred interface orientation for presentation.
    /// By default, this will animate any changes to orientation. To perform a non-animated update, call within `[UIView performWithoutAnimation:]`.
    @available(iOS 16.0, *)
    open func setNeedsUpdateOfSupportedInterfaceOrientations()

    @available(iOS, introduced: 2.0, deprecated: 8.0, message: "Header views are animated along with the rest of the view hierarchy")
    open func rotatingHeaderView() -> UIView?

    @available(iOS, introduced: 2.0, deprecated: 8.0, message: "Footer views are animated along with the rest of the view hierarchy")
    open func rotatingFooterView() -> UIView?

    @available(iOS, introduced: 2.0, deprecated: 8.0)
    open var interfaceOrientation: UIInterfaceOrientation { get }

    @available(iOS, introduced: 2.0, deprecated: 8.0, message: "Implement viewWillTransitionToSize:withTransitionCoordinator: instead")
    open func willRotate(to toInterfaceOrientation: UIInterfaceOrientation, duration: TimeInterval)

    @available(iOS, introduced: 2.0, deprecated: 8.0)
    open func didRotate(from fromInterfaceOrientation: UIInterfaceOrientation)

    @available(iOS, introduced: 3.0, deprecated: 8.0, message: "Implement viewWillTransitionToSize:withTransitionCoordinator: instead")
    open func willAnimateRotation(to toInterfaceOrientation: UIInterfaceOrientation, duration: TimeInterval)
}
extension UIViewController {

    open var isEditing: Bool

    open func setEditing(_ editing: Bool, animated: Bool)

    open var editButtonItem: UIBarButtonItem { get }
}
extension UIViewController {

    @available(iOS, introduced: 3.0, deprecated: 8.0)
    open var searchDisplayController: UISearchDisplayController? { get }
}

/*
  The methods in the UIContainerViewControllerProtectedMethods and the UIContainerViewControllerCallbacks
  categories typically should only be called by subclasses which are implementing new container view
  controllers. They may be overridden but must call super.
*/
extension UIViewController {

    
    // An array of children view controllers. This array does not include any presented view controllers.
    @available(iOS 5.0, *)
    open var children: [UIViewController] { get }

    
    /*
      If the child controller has a different parent controller, it will first be removed from its current parent
      by calling removeFromParentViewController. If this method is overridden then the super implementation must
      be called.
    */
    @available(iOS 5.0, *)
    open func addChild(_ childController: UIViewController)

    
    /*
      Removes the the receiver from its parent's children controllers array. If this method is overridden then
      the super implementation must be called.
    */
    @available(iOS 5.0, *)
    open func removeFromParent()

    
    /*
      This method can be used to transition between sibling child view controllers. The receiver of this method is
      their common parent view controller. (Use [UIViewController addChildViewController:] to create the
      parent/child relationship.) This method will add the toViewController's view to the superview of the
      fromViewController's view and the fromViewController's view will be removed from its superview after the
      transition completes. It is important to allow this method to add and remove the views. The arguments to
      this method are the same as those defined by UIView's block animation API. This method will fail with an
      NSInvalidArgumentException if the parent view controllers are not the same as the receiver, or if the
      receiver explicitly forwards its appearance and rotation callbacks to its children. Finally, the receiver
      should not be a subclass of an iOS container view controller. Note also that it is possible to use the
      UIView APIs directly. If they are used it is important to ensure that the toViewController's view is added
      to the visible view hierarchy while the fromViewController's view is removed.
    */
    @available(iOS 5.0, *)
    open func transition(from fromViewController: UIViewController, to toViewController: UIViewController, duration: TimeInterval, options: UIView.AnimationOptions = [], animations: (() -> Void)?, completion: ((Bool) -> Void)? = nil)

    
    // If a custom container controller manually forwards its appearance callbacks, then rather than calling
    // viewWillAppear:, viewDidAppear: viewWillDisappear:, or viewDidDisappear: on the children these methods
    // should be used instead. This will ensure that descendent child controllers appearance methods will be
    // invoked. It also enables more complex custom transitions to be implemented since the appearance callbacks are
    // now tied to the final matching invocation of endAppearanceTransition.
    @available(iOS 5.0, *)
    open func beginAppearanceTransition(_ isAppearing: Bool, animated: Bool)

    @available(iOS 5.0, *)
    open func endAppearanceTransition()

    
    // Override to return a child view controller or nil. If non-nil, that view controller's status bar appearance attributes will be used. If nil, self is used. Whenever the return values from these methods change, -setNeedsStatusBarAppearanceUpdate should be called.
    @available(iOS 7.0, *)
    open var childForStatusBarStyle: UIViewController? { get }

    @available(iOS 7.0, *)
    open var childForStatusBarHidden: UIViewController? { get }

    
    // Call to modify the trait collection for child view controllers.
    @available(iOS 8.0, *)
    open func setOverrideTraitCollection(_ collection: UITraitCollection?, forChild childViewController: UIViewController)

    @available(iOS 8.0, *)
    open func overrideTraitCollection(forChild childViewController: UIViewController) -> UITraitCollection?
}

extension UIViewController {

    
    @available(iOS, introduced: 6.0, deprecated: 8.0, message: "Manually forward viewWillTransitionToSize:withTransitionCoordinator: if necessary")
    open func shouldAutomaticallyForwardRotationMethods() -> Bool

    
    @available(iOS 6.0, *)
    open var shouldAutomaticallyForwardAppearanceMethods: Bool { get }

    
    /// 当视图控制器的父视图控制器发生更改时, 系统会调用此方法.
    /// 您可以重写此方法来执行相关操作, 例如添加或删除子视图控制器.
    open func willMove(toParent parent: UIViewController?)
    
    /// 当视图控制器添加到或从其父视图控制器中移除时, 系统会调用此方法.
    /// 您可以重写此方法来执行相关操作, 例如在子视图控制器添加到父视图控制器后更新界面.
    open func didMove(toParent parent: UIViewController?)
}

extension UIViewController : UIStateRestoring {

    @available(iOS 6.0, *)
    open var restorationIdentifier: String?

    @available(iOS 6.0, *)
    open var restorationClass: UIViewControllerRestoration.Type?

    @available(iOS 6.0, *)
    open func encodeRestorableState(with coder: NSCoder)

    @available(iOS 6.0, *)
    open func decodeRestorableState(with coder: NSCoder)

    @available(iOS 7.0, *)
    open func applicationFinishedRestoringState()
}

extension UIViewController {

    /* Base implementation sends -updateConstraints to the view.
        When a view has a view controller, this message is sent to the view controller during
         the Auto Layout updateConstraints pass in lieu of sending updateConstraints directly
         to the view.
        You may override this method in a UIViewController subclass for updating custom
         constraints instead of subclassing your view and overriding -[UIView updateConstraints].
        Overrides must call super or send -updateConstraints to the view.
     */
    @available(iOS 6.0, *)
    open func updateViewConstraints()
}

extension UIViewController {

    
    @available(iOS 7.0, *)
    weak open var transitioningDelegate: UIViewControllerTransitioningDelegate?
}

extension UIViewController {

    // These objects may be used as layout items in the NSLayoutConstraint API
    @available(iOS, introduced: 7.0, deprecated: 11.0, message: "Use view.safeAreaLayoutGuide.topAnchor instead of topLayoutGuide.bottomAnchor")
    open var topLayoutGuide: UILayoutSupport { get }

    @available(iOS, introduced: 7.0, deprecated: 11.0, message: "Use view.safeAreaLayoutGuide.bottomAnchor instead of bottomLayoutGuide.topAnchor")
    open var bottomLayoutGuide: UILayoutSupport { get }

    
    /* Custom container UIViewController subclasses can use this property to add to the overlay
     that UIViewController calculates for the safeAreaInsets for contained view controllers.
     */
    @available(iOS 11.0, *)
    open var additionalSafeAreaInsets: UIEdgeInsets

    
    /* Minimum layoutMargins for the view determined by the view controller from context and hardware information.
     The view controller's view will respect these minimums unless viewRespectsSystemMinimumLayoutMargins
     (which defaults to YES) is set to NO.
     */
    @available(iOS 11.0, *)
    open var systemMinimumLayoutMargins: NSDirectionalEdgeInsets { get }

    
    /* Default YES. The return value of the view's layoutMargins and directionalLayoutMargins properties will have
     values no smaller than the systemMinimumLayoutMargins. Set to NO for full customizability of the view's
     layoutMargins.
     */
    @available(iOS 11.0, *)
    open var viewRespectsSystemMinimumLayoutMargins: Bool

    
    @available(iOS 11.0, *)
    open func viewLayoutMarginsDidChange()

    @available(iOS 11.0, *)
    open func viewSafeAreaInsetsDidChange()
}

extension UIViewController {

    
    @available(iOS 9.0, *)
    open func addKeyCommand(_ keyCommand: UIKeyCommand)

    @available(iOS 9.0, *)
    open func removeKeyCommand(_ keyCommand: UIKeyCommand)
}

extension UIViewController {

    
    /// Determines whether the receiver continues to respond to actions while it is presenting a view controller modally.
    ///
    /// Defaults to YES. You can change the default return value by providing a value for UIViewControllerPerformsActionsWhilePresentingModally in your Info.plist file.
    @available(iOS 13.0, *)
    open var performsActionsWhilePresentingModally: Bool { get }
}

extension UIViewController : NSExtensionRequestHandling {

    
    // Returns the extension context. Also acts as a convenience method for a view controller to check if it participating in an extension request.
    @available(iOS 8.0, *)
    open var extensionContext: NSExtensionContext? { get }
}

extension UIViewController {

    
    @available(iOS 8.0, *)
    open var presentationController: UIPresentationController? { get }

    @available(iOS 15.0, *)
    open var sheetPresentationController: UISheetPresentationController? { get }

    @available(iOS 8.0, *)
    open var popoverPresentationController: UIPopoverPresentationController? { get }

    
    // Gets the presentation controller managing this view controller. If the original presentation controller has adapted, this returns the adaptive presentation controller. If this view controller has not yet been presented, this property returns nil.
    @available(iOS 16.0, *)
    open var activePresentationController: UIPresentationController? { get }

    @available(iOS 13.0, *)
    /// 用于指示视图控制器是否应该在呈现时允许用户交互动作来关闭模态视图
    open var isModalInPresentation: Bool
}

@MainActor public protocol UIViewControllerPreviewing : NSObjectProtocol {

    
    // This gesture can be used to cause the previewing presentation to wait until one of your gestures fails or to allow simultaneous recognition during the initial phase of the preview presentation.
    @available(iOS, introduced: 9.0, deprecated: 13.0, renamed: "UIContextMenuInteraction")
    var previewingGestureRecognizerForFailureRelationship: UIGestureRecognizer { get }

    
    @available(iOS, introduced: 9.0, deprecated: 13.0, renamed: "UIContextMenuInteraction")
    var delegate: UIViewControllerPreviewingDelegate { get }

    @available(iOS, introduced: 9.0, deprecated: 13.0, renamed: "UIContextMenuInteraction")
    var sourceView: UIView { get }

    
    // This rect will be set to the bounds of sourceView before each call to
    // -previewingContext:viewControllerForLocation:
    
    @available(iOS, introduced: 9.0, deprecated: 13.0, renamed: "UIContextMenuInteraction")
    var sourceRect: CGRect { get set }
}

@available(iOS 9.0, *)
@MainActor public protocol UIViewControllerPreviewingDelegate : NSObjectProtocol {

    
    // If you return nil, a preview presentation will not be performed
    @available(iOS, introduced: 9.0, deprecated: 13.0, renamed: "UIContextMenuInteraction")
    func previewingContext(_ previewingContext: UIViewControllerPreviewing, viewControllerForLocation location: CGPoint) -> UIViewController?

    @available(iOS, introduced: 9.0, deprecated: 13.0, renamed: "UIContextMenuInteraction")
    func previewingContext(_ previewingContext: UIViewControllerPreviewing, commit viewControllerToCommit: UIViewController)
}

extension UIViewController {

    
    // Registers a view controller to participate with 3D Touch preview (peek) and commit (pop).
    @available(iOS, introduced: 9.0, deprecated: 13.0, renamed: "UIContextMenuInteraction")
    open func registerForPreviewing(with delegate: UIViewControllerPreviewingDelegate, sourceView: UIView) -> UIViewControllerPreviewing

    @available(iOS, introduced: 9.0, deprecated: 13.0, renamed: "UIContextMenuInteraction")
    open func unregisterForPreviewing(withContext previewing: UIViewControllerPreviewing)
}

extension UIViewController {

    
    // Override to return a child view controller or nil. If non-nil, that view controller's screen edges deferring system gestures will be used. If nil, self is used. Whenever the return value changes, -setNeedsScreenEdgesDeferringSystemGesturesUpdate should be called.
    @available(iOS 11.0, *)
    open var childForScreenEdgesDeferringSystemGestures: UIViewController? { get }

    
    // Controls the application's preferred screen edges deferring system gestures when this view controller is shown. Default is UIRectEdgeNone.
    @available(iOS 11.0, *)
    open var preferredScreenEdgesDeferringSystemGestures: UIRectEdge { get }

    
    // This should be called whenever the return values for the view controller's screen edges deferring system gestures have changed.
    @available(iOS 11.0, *)
    open func setNeedsUpdateOfScreenEdgesDeferringSystemGestures()
}

extension UIViewController {

    
    // Override to return a child view controller or nil. If non-nil, that view controller's home indicator auto-hiding will be used. If nil, self is used. Whenever the return value changes, -setNeedsHomeIndicatorAutoHiddenUpdate should be called.
    @available(iOS 11.0, *)
    open var childForHomeIndicatorAutoHidden: UIViewController? { get }

    
    // Controls the application's preferred home indicator auto-hiding when this view controller is shown.
    @available(iOS 11.0, *)
    open var prefersHomeIndicatorAutoHidden: Bool { get }

    
    // This should be called whenever the return values for the view controller's home indicator auto-hiding have changed.
    @available(iOS 11.0, *)
    open func setNeedsUpdateOfHomeIndicatorAutoHidden()
}

extension UIViewController {

    
    // Override to return a child view controller or nil. If non-nil, that view controller's preferred pointer lock value will be used. If nil, self is used. Whenever the return value changes, setNeedsUpdateOfPrefersPointerLocked() should be called.
    @available(iOS 14.0, *)
    open var childViewControllerForPointerLock: UIViewController? { get }

    
    // Whether the pointer should be locked to a given scene when this view controller is shown.
    // The default is NO. This preference may or may not be honored.
    // See UIPointerLockState.locked for the current pointer lock state as determined by the system.
    @available(iOS 14.0, *)
    open var prefersPointerLocked: Bool { get }

    
    // This should be called whenever the view controller's preferred pointer lock value has changed.
    @available(iOS 14.0, *)
    open func setNeedsUpdateOfPrefersPointerLocked()
}

extension UIViewController {

    
    @available(iOS, introduced: 9.0, deprecated: 13.0, message: "UIViewControllerPreviewing is deprecated. Please use UIContextMenuInteraction.")
    open var previewActionItems: [UIPreviewActionItem] { get }
}

@available(iOS 9.0, *)
@MainActor public protocol UIPreviewActionItem : NSObjectProtocol {

    var title: String { get }
}
extension UIPreviewAction {

    
    @available(iOS 9.0, *)
    public enum Style : Int, @unchecked Sendable {

        
        case `default` = 0

        case selected = 1

        case destructive = 2
    }
}

@available(iOS 9.0, *)
@MainActor open class UIPreviewAction : NSObject, NSCopying, UIPreviewActionItem {

    
    open var handler: (UIPreviewActionItem, UIViewController) -> Void { get }

    
    public convenience init(title: String, style: UIPreviewAction.Style, handler: @escaping (UIPreviewAction, UIViewController) -> Void)
}

@available(iOS 9.0, *)
@MainActor open class UIPreviewActionGroup : NSObject, NSCopying, UIPreviewActionItem {

    public convenience init(title: String, style: UIPreviewAction.Style, actions: [UIPreviewAction])
}
